import request from '@/utils/request'

// 查询健康自测列表
export function listHealthTest(query) {
  return request({
    url: '/hospital/healthTest/list',
    method: 'get',
    params: query
  })
}

// 查询健康自测详细
export function getHealthTest(testId) {
  return request({
    url: '/hospital/healthTest/' + testId,
    method: 'get'
  })
}

// 新增健康自测
export function addHealthTest(data) {
  return request({
    url: '/hospital/healthTest',
    method: 'post',
    data: data
  })
}

// 修改健康自测
export function updateHealthTest(data) {
  return request({
    url: '/hospital/healthTest',
    method: 'put',
    data: data
  })
}

// 删除健康自测
export function delHealthTest(testId) {
  return request({
    url: '/hospital/healthTest/' + testId,
    method: 'delete'
  })
}

// 导出健康自测
export function exportHealthTest(query) {
  return request({
    url: '/hospital/healthTest/export',
    method: 'get',
    params: query
  })
}